 
package com.farsunset.cim.nio.constant;

import java.nio.charset.Charset;

/** 
 * 常量
 *
 * @author 3979434@qq.com
 */
public   interface  CIMConstant  {
    
	public static class ReturnCode{		
		public static String CODE_404 ="404";		
		public static String CODE_403 ="403";		
		public static String CODE_405 ="405";		
		public static String CODE_200 ="200";		
		public static String CODE_206 ="206";		
		public static String CODE_500 ="500";		
	}
	
	
	public static final Charset ENCODE_UTF8 = Charset.forName("UTF-8");
	
	public static byte  MESSAGE_SEPARATE='\b';
	
	public static byte  FLEX_DATA_SEPARATE='\0';
	
	public static int  CIM_DEFAULT_MESSAGE_ORDER=1;
	
	
    public static final String SESSION_KEY ="account";
	
	public static final String HEARTBEAT_KEY ="heartbeat";	

	/**
	 * FLEX 客户端socket请求发的安全策略请求，需要特殊处理，返回安全验证报文
	 */
	public static final String FLEX_POLICY_REQUEST ="<policy-file-request/>";
	
	public static final String FLEX_POLICY_RESPONSE ="<?xml version=\"1.0\"?><cross-domain-policy><site-control permitted-cross-domain-policies=\"all\"/><allow-access-from domain=\"*\" to-ports=\"*\"/></cross-domain-policy>\0"; 


   public static class RequestKey{	     
		public static String CLIENT_BIND ="client_bind";		
		public static String CLIENT_HEARTBEAT="client_heartbeat";		
		public static String CLIENT_LOGOUT ="client_logout";		
		public static String CLIENT_OFFLINE_MESSAGE ="client_get_offline_message";		
		public static String CLIENT_TRUCKER_POSITION_REPORT ="client_trucker_position_report";	
		public static String CLIENT_TRUCKER_TRAIL_REPORT ="client_trucker_trail_report";
		public static String CLIENT_MESSAGE_CONFIRM="client_message_confirm";	
	}
   
   public static class SessionStatus{		
		public static int STATUS_OK =0;		
		public static int STATUS_CLOSED =1;		
	}
   
   public static class MobileChannel{
	   public static short CHANNEL_ANDROID = 1;	
	   public static short CHANNEL_IOS = 2;	   
   }
   
   
   public static class MessageType{
		
	    //账号在其他设备绑定时，会收到该类型消息
		public static String TYPE_999 = "999";
		
		//抢单成功消息推送类型  推给用户
		public static String TYPE_001 = "301";
		
		//订单完成消息推送类型  推给用户
		public static String TYPE_002 = "302";
		
		//订单取消消息推送类型  推给用户
		public static String TYPE_003 = "303";
		
		//投诉建议消息推送类型  推给用户
		public static String TYPE_004 = "304";		
		
		//司机评论消息推送类型  推给用户
		public static String TYPE_005 = "305";	
		
		//用户下立即订单推送给司机   
		public static String TYPE_501 = "501";
		
		//用户下预约订单消息推给司机
		public static String TYPE_502 = "502";		
		
		//订单完成消息推送类型  推给司机
		public static String TYPE_503 = "503";
		
		//订单取消消息推送类型  推给司机
		public static String TYPE_504 = "504";
		
		//订单评价消息推送类型  推给司机
		public static String TYPE_505 = "505";		
		
		//投诉推送消息推送类型  推给司机
		public static String TYPE_506 = "506";	
		
		//抢单成功后推送给曾经发送过的司机
		public static String TYPE_507 = "507";	
	    
	    
	    //认证提醒  注册成功1小时后未提交完善资料
	    public static String TYPE_101 = "101";	
	    //审核通过
	    public static String TYPE_102 = "102";	
	    //审核未通过
	    public static String TYPE_103 = "103";	
	    //后台停用账号
	    public static String TYPE_104 = "104";	
	    //后台恢复已停用的账号
	    public static String TYPE_105 = "105";	
	    //后台停用用户账号
	    public static String TYPE_106 = "106";	
	    //后台恢复用户账号
	    public static String TYPE_107 = "107";	
	    
	    //后台下单推给用户
	    public static String TYPE_108 = "108";
	    //后台直接将订单匹配给司机推给司机
	    public static String TYPE_109 = "109";
	    
	    //预约订单发车前3小时
	    public static String TYPE_201 = "201";
	    //预约订单发车前1小时
	    public static String TYPE_202 = "202";	
		
	}
}